package com.bks.provider.controller;

import com.bks.provider.entity.User;
import com.bks.provider.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {

    @Autowired
    private UserService userService;


    @ResponseBody
    @RequestMapping("/queryByName")
    public User translate(String username){
        return userService.findUserByName(username);
    }


}